Skip to content

feat: add openspec generate command#1

Merged
fernandomenuk merged 1 commit intomasterfrom
feat/generate-command
Mar 13, 2026
Merged

feat: add openspec generate command#1
fernandomenuk merged 1 commit intomasterfrom
feat/generate-command

Conversation

@fernandomenuk
Copy link
Owner

Summary

  • Adds openspec generate command that performs deep codebase analysis (language, framework, build tools, testing, linting, styling, databases, CI/CD, package manager, project structure)
  • Samples actual source files and detects code patterns (hooks, barrel imports, path aliases, async handlers, etc.)
  • Outputs structured markdown or JSON context for AI agents to write project-specific module files
  • 10 parallel detectors, source file sampler, markdown/JSON formatter
  • 38 new tests (68 total), README updated with full docs

Test plan

  • npm run build compiles successfully
  • npm test — all 68 tests pass
  • openspec generate outputs correct analysis for this repo
  • openspec generate --json outputs valid JSON
  • README updated with generate command docs

🤖 Generated with Claude Code

Adds a new `generate` command that performs deep codebase analysis — scanning
package.json, config files, directory structure, and actual source code patterns —
then outputs a structured context document. AI agents (Claude Code, Cursor, etc.)
read this output and use it to write rich, project-specific module files.

Scanner architecture:
- 10 parallel detectors (language, framework, build-tool, testing, linting,
  styling, structure, package-manager, database, cicd)
- Source file sampler that reads representative files and detects code patterns
- Formatter with markdown (default) and JSON output modes

Includes 38 new tests (68 total) covering detectors, sampler, formatter,
and integration scenarios. README updated with docs and examples.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@fernandomenuk fernandomenuk merged commit 2a1ab05 into master Mar 13, 2026
16 checks passed
@fernandomenuk fernandomenuk deleted the feat/generate-command branch March 13, 2026 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants